
import 'package:flutter/material.dart';

defaultAppConfig({bool isDarkModel=false}){
  Color fontColor = Colors.black;
  return AppBarConfig(
    appBarHeight: 52,
    backgroundColor: const Color(0xffededed),
    actionsIconTheme:  IconThemeData(
      color: fontColor,
    ),
    iconThemeData:  IconThemeData(
      color: fontColor,
    ),
    titleStyle: TextStyle(color: fontColor, fontSize: 16),
    centerTitle: true,
  );
}

class AppBarConfig {
  /// appBar 高度
  double? appBarHeight;
  /// appbar Icon 主题
  IconThemeData? iconThemeData;
  /// appbar action 主题
  IconThemeData? actionsIconTheme;
  /// appbar 阴影
  final double elevation;
  /// appBar title
  String? title;
  /// appBar title样式
  TextStyle? titleStyle;
  /// appBar title 是否居中
  final bool centerTitle;
  /// appBar 背景颜色
  Color? backgroundColor;
  AppBarConfig({
    this.centerTitle=true,
    this.elevation=1,
    this.backgroundColor,
    this.titleStyle,
    this.title,
    this.actionsIconTheme,
    this.iconThemeData,
    this.appBarHeight,
  });
}
